1. Field of the Invention
This invention relates to keyboards as input devices to computer systems and methods of operation. More particularly, the invention relates to extended keyboard support for keys not recognizable on standard or non-standard keyboards for computer systems operating in a run time environment.
2. Description of Prior Art
Computer systems operating in an interpretive or run time environment decode program instructions xe2x80x9con the flyxe2x80x9d without compiling the instructions and generating machine code for the instructions as in many computer operating systems. Several programming languages are available for writing applications executable in a run time environment. JAVA, a programming language created by Sun Micro Systems, Mountain View, Calif. is one popular programming language for writing applications operating in a run time environment. However, keyboard support has been found lacking in Java applications, or applications prepared in Java programming language. In particular, a Java application has no means to differentiate between the press of the right hyphen ALT or the left hyphen ALT key. The same holds true for the CTRL left and right keys. Further shortcomings come into play when Java applications are needed to perform actions based on special keys included on non-standard keyboards. Many of these non-standard keyboards include keys above and beyond the standard 101 key keyboard. Java applications do not appear to receive adequate information from the Java environment to determine which special key was actuated. The returned information for special keys is insufficient when using the classes provided by the Sun and Microsoft Java development kits (JDK""s) used to build Java applications. What is needed in the art is a method for Java applications to obtain necessary information required to distinguish the xe2x80x9crightxe2x80x9d from the xe2x80x9cleftxe2x80x9d (ALT and CTRL keys). It is also desirable for Java applications to have a method to receive complete scan code information for special keys on non-standard keyboards.
Prior art related to keyboard management includes:
U.S. Pat. No. 5,086,503 to C. Y. Chung et al., issued Feb. 4, 1992, discloses remapping of keyboards using a plurality of terminal emulators which are included in a computer system requiring different keyboard inputs. The keyboard program is activated to display one of a plurality of keyboard layouts to be remapped for a selected emulator. A plurality of definitions is displayed in response to the selection of a key in the displayed keyboard layout. An action is then selected to modify one or more definitions of the selected key. Thereafter, a plurality of keys and their respective definitions may be simultaneously displayed.
U.S. Pat. No. 5,197,147 to M. L. Long et. al., issued Mar. 23, 1993, discloses a keyboard translation system providing translations between a keycode sent to the keyboard controller of the computer and the code sent from the keyboard controller to the CPU. A control ROM is used to select translated key code signals from a keycode look-up table under the control of program counter and keyboard keycode signals from the keyboard. These translated signals then are supplied through an accumulator to the CPU of the computer.
U.S. Pat. No. 5,249,287 to J. R. MacDonald et al., issued Sep. 28, 1993, discloses a keyboard interface which includes a first keyboard logic responsive to a first mode select signal for providing a first set of control signals and a second keyboard logic responsive to second mode select signal for providing a second set of control signals. A multiplexer couples the first set of control signals to the set of terminals responsive to the first mode select signal and couples a second set of control signals to the set of terminals responsive to the second mode select signal. A keyboard register provides the first or second mode select signal to the first and second keyboard logic in the multiplexer.
U.S. Pat. No. 5, 640,540 to C. M. Ansberry et al., issued Jun. 17, 1997, describes a software solution that allows varying keystroke information coming from an X server to be interpreted correctly on a remote computer system that may have a different keyboard configuration than that of the server. Each remote system is queried by the server for it""s unique keyboard configuration. The server then sends the appropriate keyboard translation codes to the remote system.
U.S. Pat. No. 5,642,110 to C. F. Raasch et al., issued Jun. 24, 1997, discloses a memory mapped keyboard controller. In a first mode of operation the controller activates all the columns and monitors all the rows in a keyboard switch matrix to detect when any one or more of the key rows becomes active. When any row in the matrix is detected as active, then the keyboard controller enters a second mode where it selectively activates individual columns and monitors the rows in the switch matrix to determine which row and column contain the activated switch. When the switch location is determined, location is interpreted by the keyboard controller into a scanned code for use in Industry Standard Architecture (ISA).
None of the prior art discloses a keyboard programmatically adapted to enable a application operating in a run time environment, particularly a Java application to recognize keys otherwise non-recognizable keys in a standard keyboard or special keys not otherwise recognizable in a non-standard keyboard, when actuated.
An object of the invention is an improved keyboard and method of operation for interfacing with an application executing in a run time environment in a computer system and facilitating recognition of keys not otherwise recognizable by the application.
Another object is an improved keyboard and method of operation for interacting with a Java application executing in a computer system and facilitating the recognition of operator keys in a standard keyboard.
Another object is an improved keyboard and method of operation for interfacing with a Java application executing in a computer system and facilitating the recognition of special keys in a non-standard keyboard.
Another object is an improved keyboard and method of operation for interfacing with a Java application executing in a computer system and facilitating the recognition of xe2x80x9cleftxe2x80x9d or xe2x80x9crightxe2x80x9d ALT/CTRL keys in a standard keyboard.
Another object is an improved keyboard and method of operation for interfacing with a Java application executing in a computer system and facilitating the recognition of special keys in a non-standard keyboard.
These and other objects, features and advantages are achieved in one embodiment including a keyboard programmatically adapted to enable a Java application executing in a runtime environment to distinguish keys (ALT/CTRL), not otherwise recognizable on a standard keyboard and special keys not otherwise recognizable on a non-standard keyboard, when actuated. A native Dynamic Link Library (DLL) is created in memory to capture a keystroke stream and maintain state information about the keyboard. A Java Native Interface (JNI) is created in a DLL and provided to the Java application. At initialization time, the Java application loads the native DLL from within its static constructor. The native DLL contains extended program instructions related to key recognition and state information. The Java application receives notification when an ALT or CTRL key is actuated. At that time, the Java application calls the native DLL to get program instruction to determine whether a xe2x80x9crightxe2x80x9d or xe2x80x9cleftxe2x80x9d ALT or CTRL key was actuated. The DLL programmatically determines whether the xe2x80x9crightxe2x80x9d or xe2x80x9cleftxe2x80x9d ALT or CTRL key was struck. The DLL provides the Java application a flag that allows the application to determine if the xe2x80x9crightxe2x80x9d or xe2x80x9cleftxe2x80x9d ALT/CTRL key was actuated. On a non-standard keyboard, the Java application calls the native DLL to receive the necessary information on the key that was actuated. Again, the DLL programmatically provides a flag that allows the Java application to determine if the special key was actuated.